package com.rocky.project.service;
import java.io.Serializable;
import java.util.Collection;

import com.rocky.project.util.Page;
import com.rocky.project.util.Result;

public interface BaseDao {
	public void create(Object entity);
	public void update(Object entity);
	public void delete(Object entity);
	public void deleteTrue(Object entity);
	public void evict(Object entity);
	public void merge(Object entity);
	public Object get(Class cls, Serializable id);
	public void clearCache();
	public Collection loadAll(Class entityClass);
	public Result executeHqlNoParam(String querySql, Page page);
	public Result executeHqlWithParam(String querySql, Object[] values, Page page);	
	
	public Collection executeHqlNoParam(String queryHql, int startAtIndex,	Integer pageSize) ;
	public Collection executeHqlWithParam(String queryHql, Object[] values,	int startAtIndex, Integer pageSize) ;	
	public int getCountHqlNoParam(String querySql) ;
	public int getCountHqlWithParam(String querySql, Object[] values) ;
	
	
}
